package com.group3.controller.studentController;

import com.group3.domain.AttendanceResult;
import com.group3.pojo.receive.SLessonReceive;
import com.group3.pojo.result.LessonResult;
import com.group3.pojo.Page;
import com.group3.service.StudentLessonService;
import com.group3.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "学生接口")
@RestController
@RequestMapping("/student/lesson")
@CrossOrigin
public class StudentLessonController {

    @Resource
    private StudentLessonService studentLessonService;

    @GetMapping(value = "/getLesson")
    @ApiOperation(value = "根据学生id查询学生个人的课程")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "studentId", value = "学生id",
                    dataType = "String",required = true),
            @ApiImplicitParam(name = "startDateTime", value = "上课日期时间段开始",
                    dataType = "String"),
            @ApiImplicitParam(name = "endDateTime", value = "上课日期时间段结束",
                    dataType = "String"),
            @ApiImplicitParam(name = "lessonName", value = "项目（课程）名称",
                    dataType = "String"),
            @ApiImplicitParam(name = "teacherS", value = "实训教师",
                    dataType = "String"),
            @ApiImplicitParam(name = "teacherZ", value = "责任教师",
                    dataType = "String"),
    })
    public Result<List<LessonResult>> getLessonSchedule(SLessonReceive receive) {

        Result result = studentLessonService.getLesson(receive);

        return result;
    }

}
